<div class="panel-body">
    <form name="form1" id="form1" class="form-horizontal ng-pristine ng-valid ng-valid-required">
      <div class="form-group" ng-show="!tabData.status.adduser">
        <label class="col-lg-3 control-label">登录名:</label>
        <div class="col-lg-6">
          <input type="text" class="form-control" ng-disabled="true" ng-model="baseinfo.login_name">
        </div>
      </div>
      <div class="form-group">
        <label class="col-lg-3 control-label"><span class="red_font">* </span>登录手机号:</label>
        <div class="col-lg-6">
          <input type="text" class="form-control" ng-model="baseinfo.mobile">
        </div>
      </div>
      <div class="form-group">
        <label class="col-lg-3 control-label"><span class="red_font">* </span>名称:</label>
        <div class="col-lg-6">
          <input type="text" class="form-control" ng-model="baseinfo.name">
        </div>
      </div>
      <!-- <div class="form-group">
        <label class="col-lg-3 control-label">工号:</label>
        <div class="col-lg-6">
          <input type="text" class="form-control" ng-model="baseinfo.no">
        </div>
      </div> -->
      <div class="form-group">
        <label class="col-lg-3 control-label"><span class="red_font" ng-show="tabData.status.adduser">* </span>密码:</label>
        <div class="col-lg-6">
          <input type="password" class="form-control" maxlength="16" minlength="8" ng-pattern="/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/" 
          name="password" popover="密码长度在8-16位" popover-trigger="mouseenter" ng-model="baseinfo.password">
        </div>
        <label class="control-label text-muted" ng-show="!tabData.status.adduser && !form1.password.$dirty">若不修改密码，请留空。</label>
        <label class="control-label red_font" ng-show="form1.password.$dirty">
          <span ng-show="form1.password.$invalid && !form1.password.$error.required" class="ng-hide">密码需字母与数字组合</span>
        </label>
      </div>
      <div class="form-group">
        <label class="col-lg-3 control-label"><span class="red_font" ng-show="tabData.status.adduser">* </span>确认密码:</label>
        <div class="col-lg-6">
          <input type="password" class="form-control" maxlength="16" minlength="8" name="passwordc" ng-model="baseinfo.passwordc" 
          ui-validate=" '$value==baseinfo.password' " ui-validate-watch=" 'baseinfo.password' ">
        </div>
        <label class="control-label red_font" ng-show="form1.passwordc.$dirty">
          <span ng-show="form1.passwordc.$error.validator && !form1.passwordc.$error.required" class="ng-hide">两次密码不相同!</span>
        </label>
      </div>
      <div class="form-group">
        <label class="col-lg-3 control-label">邮箱:</label>
        <div class="col-lg-6">
          <input type="email" name="email" class="form-control" ng-model="baseinfo.email">
        </div>
        <label class="control-label red_font" ng-show="form1.email.$dirty">
          <span ng-show="form1.email.$invalid && !form1.email.$error.required" class="ng-hide">邮箱格式不正确!</span>
        </label>
      </div>
      <div class="form-group">
        <label class="col-lg-3 control-label">电话:</label>
        <div class="col-lg-6">
          <input type="text" class="form-control" ng-model="baseinfo.phone">
        </div>
      </div>
      <div class="form-group">
        <label class="col-lg-3 control-label">是否可用:</label>
        <div class="col-lg-4">
          <label class="i-switch m-t-xs m-r">
            <input type="checkbox" ng-true-value="'1'" ng-false-value="'0'" ng-model="baseinfo.login_flag"><i></i>
          </label>
        </div>
      </div>
      <div class="form-group">
        <label class="col-lg-3 control-label"><span class="red_font">* </span>用户角色:</label>
        <div class="col-lg-7">
          <div class="btn-group">
            <label class="btn btn-sm btn-default role_style" ng-model="baseinfo.role_ids" ng-repeat="info in tabData.roleList" 
            btn-radio=info.id><i class="fa fa-check text-active"></i> {{info.name}}</label>
          </div>
          <a class="btn btn-xs btn-link under-line" style="color: #428bca" ng-click="addRole()">前去添加角色</a>
          <!-- <label ng-repeat="info in tabData.roleList" style="margin-bottom:2px; margin-right:2px; width:116px" 
           class="btn btn-sm btn-default" ng-model="info.active" btn-checkbox="">
            <span class="text">{{info.name}}</span>
            <i class="fa fa-check text-active"></i>
            <span class="text-active">{{info.name}}</span>    
          </label> -->
        </div>
      </div>
      <div class="form-group">
        <label class="col-lg-3 control-label">备注:</label>
        <div class="col-lg-6">
          <textarea class="form-control" rows="3" ng-model="baseinfo.remarks"></textarea>
        </div>
      </div>
    </form>

    <div class="col-lg-6 col-lg-offset-3">
      <button class="btn btn-primary btn-rounded" ng-click="save(form1)">保存</button>
      <button class="btn btn-default btn-rounded" ng-click="cancel()">取消</button>
    </div>
  </div>